package com.msb.apiboss.feign;

import com.msb.commons.dto.Car;
import com.msb.commons.dto.DriverCarBindingRelationship;
import com.msb.commons.dto.DriverUser;
import com.msb.commons.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: chshh
 * @version: 1.0
 */

@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @PostMapping("/user")
    public ResponseResult addDriverUser(@RequestBody DriverUser driverUser);

    @PutMapping("/user")
    public ResponseResult updateDriverUser(@RequestBody DriverUser driverUser);

    @PostMapping("/car")
    public ResponseResult addCar(@RequestBody Car car);

    @PostMapping("/driverCarBindingRelationship/bind")
    public ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);

    @PostMapping("/driverCarBindingRelationship/unbind")
    public ResponseResult unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);
}
